package base;

public class People {
    //用户姓名
    private String name;

    private  String sex;
    private  int age;
    private  String adress;
    private double height;//身高的单位是米

    public People(){

    }
    public People(String name1,String sex,int age,String adress,double height){
      this.name=name1;
      this.age=age;
      this.adress=adress;
      this.sex=sex;
      this.height=height;
    }
    public String getName() {
//        王**；
//        return name;
        return name.substring(0,1) + "**";
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public String getAdress() {
        return adress;
    }

    public void setAdress(String adress) {
        this.adress = adress;
    }

    public double getHeight() {
        return height;
    }

    public void setHeight(double height) {
        this.height = height;
    }
    public String introduce(){
        return "我叫"+this.name+",今年"+this.age+"岁，我家在"+this.adress+"我的身高是"+this.height+"米。";
    }
}
